package com.tvunetworks.center.device.controller.feign;

import com.tvunetworks.center.common.feign.AnywhereControlFeignInterface;
import com.tvunetworks.center.device.service.AnywhereControlService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.nio.channels.NotYetConnectedException;
import java.security.InvalidParameterException;
/**
 * @author lebron
 */
@RestController
@RequestMapping("/feign")
@Slf4j
public class AnywhereControlFeignController implements AnywhereControlFeignInterface {
    @Autowired
    private AnywhereControlService anywhereControlService;
    @Override
    public void focusControlMsg(String recipient, int[] parameter) throws NotYetConnectedException {
        anywhereControlService.focusControlMsg(recipient,parameter);
    }

    @Override
    public void zoomControlMsg(String recipient, int[] parameter) throws NotYetConnectedException {
        anywhereControlService.zoomControlMsg(recipient,parameter);
    }

    @Override
    public void exposureControlMsg(String recipient, int[] parameter) throws NotYetConnectedException {
        anywhereControlService.exposureControlMsg(recipient,parameter);
    }

    @Override
    public void cropControlMsg(String recipient, int[] parameter) throws NotYetConnectedException {
        anywhereControlService.cropControlMsg(recipient,parameter);
    }

    @Override
    public String toggelCropStatus(String recipient, int[] openFlag) throws InvalidParameterException {
        return anywhereControlService.toggelCropStatus(recipient,openFlag);
    }

    @Override
    public void toggleCropStatus(String recipient, int[] openFlag) throws InvalidParameterException {
        anywhereControlService.toggleCropStatus(recipient,openFlag);
    }

    @Override
    public void resetAllEffect(String recipient) throws NotYetConnectedException {
        anywhereControlService.resetAllEffect(recipient);
    }

    @Override
    public String getDeviceResolution(String recipient) throws NotYetConnectedException {
        return  anywhereControlService.getDeviceResolution(recipient);
    }

    @Override
    public void queryDeviceResolution(String recipient) throws NotYetConnectedException {
        anywhereControlService.queryDeviceResolution(recipient);
    }

    @Override
    public void isAuto(String recipient, int[] openFlag) throws NotYetConnectedException {
        anywhereControlService.isAuto(recipient,openFlag);
    }
}
